import http from "@/http/index"


export default {

    add: {
        name: "添加购物车",
        url: "/api/cart/add",
        call: async function (params: any = {}) {
            return await http.post(this.url, params)
        }
    },
    select: {
        name: "查询购物车",
        url: "/api/cart/list",
        call: async function (params: any = {}) {
            return await http.get(this.url, params)
        }
    },
    changeQty: {
        name: "更新购物车",
        url: "/api/cart/update",
        call: async function (params: any = {}) {
            return await http.put(this.url, params)
        }
    },
    delCart: {
        name: "删除购物车",
        url: "/api/cart/del",
        call: async function (params: any = {}) {
            return await http.delete(this.url, params)
        }
    },

}
